package com.google.android.c2dm;

import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

public final class a
{
  static void a(Context paramContext)
  {
    SharedPreferences.Editor localEditor1 = paramContext.getSharedPreferences("com.google.android.c2dm", 0).edit();
    SharedPreferences.Editor localEditor2 = localEditor1.putString("dm_registration", "");
    long l = System.currentTimeMillis();
    SharedPreferences.Editor localEditor3 = localEditor1.putLong("last_registration_change", l);
    boolean bool = localEditor1.commit();
  }

  public static void a(Context paramContext, String paramString)
  {
    Intent localIntent1 = new Intent("com.google.android.c2dm.intent.REGISTER");
    Intent localIntent2 = localIntent1.setPackage("com.google.android.gsf");
    Intent localIntent3 = new Intent();
    PendingIntent localPendingIntent = PendingIntent.getBroadcast(paramContext, 0, localIntent3, 0);
    Intent localIntent4 = localIntent1.putExtra("app", localPendingIntent);
    Intent localIntent5 = localIntent1.putExtra("sender", paramString);
    ComponentName localComponentName = paramContext.startService(localIntent1);
  }
}